# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>

pkgname=libgsf
pkgver=1.14.41+3+gc7b4b53
pkgrel=1
arch=(i686 x86_64)
pkgdesc="An extensible I/O abstraction library for dealing with structured file formats"
url="https://git.gnome.org/browse/libgsf"
license=('GPL' 'LGPL')
depends=('libxml2' 'gdk-pixbuf2' 'bzip2')
makedepends=('intltool' 'gobject-introspection' git gtk-doc autoconf-archive)
_commit=c7b4b53020d507dccf8ba73c5a2a3a23cc649562  # master
source=("git+https://git.gnome.org/browse/libgsf#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^LIBGSF_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

check() {
  cd $pkgname
  make check
}

build() {
  cd "$pkgname"
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static --enable-introspection --enable-gtk-doc
  make
}

package_libgsf() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
